import { Column } from "typeorm";
import { ExtIntro, SMALLINT_PG, VARCHAR255_PG, VARCHAR50_PG } from "qqlx-core";

import { TransformerVarchar255, TransformerVarchar50 } from "@lib/orm.transfor.string";
import { TransformerSmallInt } from "@lib/orm.transfor.number";

import { OwnerUUidSchema } from "@/alpha/ext.uuid.base";

export class UUidIntroSchema extends OwnerUUidSchema implements ExtIntro {
  @Column({ transformer: new TransformerVarchar50() })
  name: VARCHAR50_PG = "";

  @Column({ transformer: new TransformerVarchar255() })
  desc: VARCHAR255_PG = "";

  @Column({ transformer: new TransformerVarchar255() })
  content: VARCHAR255_PG = "";

  @Column({ transformer: new TransformerVarchar255() })
  remark: VARCHAR255_PG = "";

  @Column({ transformer: new TransformerSmallInt() })
  sequence: SMALLINT_PG = -1;
}
